<!DOCTYPE html>
<html>
<head>
    <title>{$index.title}</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="description" content="{$index.description}" />
    <meta name="keywords" content="{$index.keyword}" />

    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/>
    <!-- css -->
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link href="__HOME__css/iconfont.css" rel="stylesheet"/>
    <link href="__HOME__css/am.css" rel="stylesheet"/>
    <link href="__HOME__css/flexslider.css" rel="stylesheet"/>
    <link href="__HOME__css/style.css" rel="stylesheet"/>
    <link rel="stylesheet" href="__HOME__css/blueimp-gallery.min.css">
    <link rel="stylesheet" type="text/css" href="__HOME__js/layer/theme/default/layer.css">
    <style >
        .tanchu{position: fixed;display: none;top: 150px;left: 50%;margin-left: -250px;z-index: 300;}
        .heibeijing{position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background: rgba(0,0,0,.6);z-index: 299;}
        ._contactus{background: #fff;padding: 20px;}
        .guanbi{position: absolute;right: 10px;top: 10px;font-size: 20px;cursor: pointer;}

    </style>
    {$seo.head}
</head>
<body>
{$seo.body}

<div class="wrap">
    <!--导航-->
    {include file="public/header" /}

    <!-- page_banner -->
    <div class="page_banner magtopmenu">
        <div class="pagebanner_pic">
            <ul class="page_banner_slider clear">
                {volist name="banner" id="v" key="k"}
                <li>
                    <div class="pic">
                        <a {if $v.url neq null}href="{$v.url}"{/if}>
                            <img src="{$v.img_url}" alt="{$v.alt}" title="{$v.alt}">
                        </a>
                    </div>
                    <div class="desc">
                        {$v.content}
                    </div>
                </li>
                {/volist}

            </ul>
        </div>
    </div>
    <!-- page_banner end -->


    <!-- position -->
    <div class="position_content">
        <div class="public clear">
            <div class="position fl">
                <i class="iconfont icon-zhuye"></i>
                <a href="/">首页</a> >
                <!--  <a href="/">Support </a> > -->
                <a>下载</a>
            </div>
        </div>
    </div>
    <!-- position end -->


    <!-- page -->
    <div class="_download padi40">
        <div class="public">
            <div class="singlepro_top">
                <h3 class="title">下载</h3>
            </div>
            <ul class="_download_list">
                {volist name="list" id="v" key="k"}
                <li class="am">
                    <div class="clear _list">
                        <div class="fl _list_l" style="width: 80%;">
                            <h3 class="_title am">{$v.name}</h3>
                            <span class="_date">{$v.create_time}</span>
                            <p class="_text">{$v.content}</p>
                        </div>
                        <div class="fr _list_r" style="width: 13.5%;">
                            <div class="_download_icon"><i class="iconfont icon-pdf1"></i></div>

                            <a class="_navbar download" id="dow{$v.id}" data-id="{$v.id}" data-url="{$v.zip_url}" download="{$v.name}"><i class="iconfont icon-xiazai"></i>下载</a>

                        </div>
                    </div>
                </li>
                {/volist}
            </ul>
        </div>
    </div>

    <div class="tanchu">
        <div class="_contactus">
            <i class="iconfont icon-guanbi guanbi"></i>
            <div class="_form" style="width: 500px;margin: 0 auto;padding-top: 30px;">
                <form id="Contactus_form">
                    <input class="_inp_text" type="text" id="name" name="name"  placeholder="姓名 *" autocomplete="off">
                    <input class="_inp_text" type="text" id="tel" name="tel"  placeholder="手机 *" autocomplete="off">
                    <input class="_inp_text" type="text" id="com" name="com"  placeholder="公司" autocomplete="off">
                    <input class="_inp_text" type="text" id="email" name="email"  placeholder="邮箱地址" autocomplete="off">


                    <!--  <textarea class="_inp_text"  type="text" id="content" name="message"  placeholder="Message *" autocomplete="off"></textarea> -->
                </form>
                <a class="_submit" id="subMit" >提交</a>
                <!--<p class="_text">We treat your data in accordance to the EU General Data Protect Regulation (GDPR). For further information please see our privacy statement.</p>-->
            </div>
        </div>
    </div>
    <div class="heibeijing"></div>
    <input type="hidden" id="id" value="">
    <input type="hidden" id="url" value="">
    {include file="public/footer" /}
    <script src="__HOME__js/jquery.cookie.js"></script>
    <script type="text/javascript">
        //字数限制
        $('._list_l p._text').wordLimit(260);

        $('.download').click(function(){
            if($.cookie('xiazai')==1){
                var url = $(this).attr('data-url');
                var id = $(this).attr('data-id');
               
                window.open(url);

            }else {
                var id = $(this).attr('data-id');
                var url = $(this).attr('data-url');
                $('#id').val(id);
                $('#url').val(url);
                $(".tanchu").css('display', 'block');
                $(".heibeijing").css('display', 'block');


            }

        });
        $(".heibeijing").click(function() {
            $(".tanchu").css('display', 'none');
            $(".heibeijing").css('display', 'none');
        });

        $(".guanbi").click(function() {
            $(".tanchu").css('display', 'none');
            $(".heibeijing").css('display', 'none');
        });
    </script>
    <script type="text/javascript">

        $('#subMit').click(function(){
            var email = $('#email').val();
            var tel = $("#tel").val();
            if(!$('#name').val()){
                alert('请填写姓名！')
                return false;
            }else if(!tel){
                alert('请填写手机!')
                return false;
            }


            $.ajax({
                type: "POST",
                dataType: "json",
                url: '/home/danye/addcontactus',
                data: {
                    'name':$('#name').val(),
                    'com':$('#com').val(),
                    'email':email,
                    'tel':$('#tel').val(),
                    'country':"",
                    'content':$('#content').val(),
                    'type':2
                },
                success: function (res) {

                    var success = JSON.parse(res);
                    if(success.code===200){

                        $(".tanchu").css('display', 'none');
                        $(".heibeijing").css('display', 'none');
                        $.cookie('xiazai', '1', { expires: 7, path: '/' });
                        var urlzip = $('#url').val();
                        var id = $('#id').val();
                        var aaab = document.getElementById("dow"+id);
                        aaab.href=urlzip;
                        alert('提交成功!');


                    }else {
                        alert(success.msg);
                    }

                }
            });

        })
    </script>